date = input("请输入年份：")

year = date.split('-')[0]
month = date.split('-')[1]
day = date.split('-')[2]

if int(month) in [1,2]:
    year = int(year)-1
    month = int(month)+11

c = int(str(year)[0:2])
y = int(str(year)[2:4])
m = int(month)
d = int(day)

print(c,y,m,d)

w = y + int(y/4)+int(c/4)-2*c+int(26*(m+1/10))+d-1

print(w%7)